<template>
  <div>
    <el-input v-model="cls.name" placeholder="请输入内容" style="width:300px"></el-input><br><br>
    <select v-model="cls.kid" style="width:100px">
        <option value="1">人工智能</option>
        <option value="2">大数据</option>
    </select><br><br>
    <el-button @click="update">修改</el-button>

  </div>
</template>

<script>
import axios from 'axios'
export default {
    data(){
        return{
            cls:this.$route.query.id,
            
        }
    },
    methods:{
        update(){
            axios.put('http://127.0.0.1:5000/upd/'+this.cls.id,this.cls).then((res) => {
                alert(res.data.msg)
                this.$router.push('classes')
            })
        }
    },
    mounted(){
        
    }
}
</script>

<style>

</style>